package com.example.camunda.dto;

import lombok.Data;
import org.camunda.bpm.engine.repository.Deployment;
import org.springframework.beans.BeanUtils;

import java.util.Date;

/**
 * 流程部署DTO
 *
 * @author heshao
 * @date 2021/11/9 15:05
 **/
@Data
public class DeploymentDto {

    private String id;
    private String name;
    private String source;
    private Date deploymentTime;
    private String tenantId;

    public static DeploymentDto from(Deployment deployment) {
        DeploymentDto dto = new DeploymentDto();
        BeanUtils.copyProperties(deployment, dto);
        return dto;
    }
}
